package com.wthink.hzgj.util;

import android.app.Instrumentation;

public class CustomKeyEventProc {

	public static final int KEY_F1 = 2;	//F1
	public static final int KEY_F2 = 3;	//F2
	public static final int KEY_F3 = 4;	//F3
	public static final int KEY_F4 = 5;	//F4
	public static final int KEY_F5 = 6;	//F5
	public static final int KEY_F6 = 7;	//F6
	public static final int KEY_F7 = 8;	//F7
	public static final int KEY_F8 = 9;	//F8
	public static final int KEY_F9 = 10;	//F9
	public static final int KEY_F0 = 11;	//F0
	public static final int KEY_DB_1 = 12;
	public static final int KEY_DB_2 = 13;
	public static final int KEY_DB_3 = 14;
	public static final int KEY_DB_4 = 15;
	public static final int KEY_DB_5 = 16;
	public static final int KEY_DB_6 = 17;
	public static final int KEY_DB_7 = 18;
	public static final int KEY_DB_8 = 19;
	public static final int KEY_DB_9 = 20;
	public static final int KEY_DB_0 = 21;

	//F2
	public static final int CUSTOM_KEYCODE_UP = 3;
	//F8
	public static final int CUSTOM_KEYCODE_DOWN = 8;
	//F4
	public static final int CUSTOM_KEYCODE_LEFT = 7;
	//F6
	public static final int CUSTOM_KEYCODE_RIGHT = 9;
	//CENTER
	public static final int CUSTOM_KEYCODE_CENTER = 139;

	/**
	 * @param keyCode
	 */

	public static final int CUSTOM_KEYCODE_REPLAY = 188;
	public static final int CUSTOM_KEYCODE_PLAY = 191;
	public static final int CUSTOM_KEYCODE_ALARM = 189;
	public static final int CUSTOM_KEYCODE_AUTO = 193;
	public static final int CUSTOM_KEYCODE_BACK = 158;
	public static final int CUSTOM_KEYCODE_MENU = 139;

	public static final int CUSTOM_KEYCODE_REVERSING = 311;

	public static final int CUSTOM_KEYCODE_FINGERPRINT = 181;


	public static void sendKeyThread(final int keyCode) {
		Thread sendKeyThread = new Thread() {
			public void run() {
				Instrumentation inst = new Instrumentation();
				inst.sendKeyDownUpSync(keyCode);
			}
		};
		sendKeyThread.start();
	}
}
